<template>
  <router-link :to="path" class="wrapper">
    <i class="icon">{{ iconText }}</i>
    <p class="text">
      <slot></slot>
    </p>
  </router-link>
</template>

<script>
export default {
    props :{
        iconText:String,
        path:String
    },
};
</script>

<style lang="less" scoped>
.wrapper{
    font-size: 0.12rem;
    .icon{
        display: flex;
        justify-content: center;  //水平居中
        align-items: center;  //垂直居中
        width: .25rem;
        height: .25rem;
        background: #ddd;
        color: #999;
        border-radius: 50%;
    }
    .text{
      text-align:center;
      margin-top: .02rem;
      color: #999;
    }

    &.router-link-active{
      .icon{
        background: pink;
        color: white;
      }
    }
}
</style>
